package com.example.demo.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: DELL
 * Date: 2023-05-31
 * Time: 11:52
 */
@RestController
public class LogController {
    // 创建日志对象
    public static final Logger log = LoggerFactory.getLogger(LogController.class);

    @RequestMapping("/user/log")
    public String longLog() {
        System.out.println("执行登陆功能");
        log.info("记录操作日志 : 用户成功登陆");
        return "Spring AOP";
    }
}
